<% if target.errors.any? %>
  <div class="col-md-12 alert alert-block alert-danger">
    <a class="close" data-dismiss='alert' href="#"></a>
    <div><strong>有 <%= target.errors.count %> 处问题导致无法提交:</strong></div>
    <ul>
      <% target.errors.full_messages.each do |msg| %>
       <li><%= msg %></li>
      <% end %>
    </ul>
  </div>
<% end %>